﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户管理</title>
		<link rel="stylesheet"
			href="../../css/table.css" type="text/css"/>
		<script type="text/javascript">

		</script>

		<!--分页插件-->
		<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"></link>
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript">
  function  tjyh() {
	  location="user_add";
  }

  function  del(obj) {
      if (confirm("确定删除此用户吗？")) {
          location="user_list_delete?id="+obj;
      }
  }


</script>
	</head>
	<body>
	<form action="" name="f1" method="post">
		<table width="100%">
			<tr>
				<td>
					<font color="black">您正在做的业务是：人力资源--权限管理--用户管理 </font>
				</td>
			</tr>
			<tr>
				<td>
					当前角色总数：6例
				</td>
			</tr>
			<tr>
				<td align="right">
					<input type="button" value="添加用户" class="BUTTON_STYLE1" onclick="tjyh()">
				</td>
			</tr>
		</table>
		<table width="100%" border="1" cellpadding=5 cellspacing=1
				bordercolorlight=#848284 bordercolordark=#eeeeee
				class="TABLE_STYLE1">
			<tr class="TR_STYLE1">
				<td class="TD_STYLE1">
					用户编号
				</td>
				<td class="TD_STYLE1">
					用户名称
				</td>
				<td class="TD_STYLE1">
					真实姓名
				</td>
				<td class="TD_STYLE1">
					用户密码
				</td>
				<td class="TD_STYLE1">
					用户身份
				</td>
				<td class="TD_STYLE1">
					操作
				</td>
			</tr>
			<div th:each="f:${ucm}">
				<tr class="TR_STYLE2">
					<td class="TD_STYLE2" th:text="${f.u_id}">

					</td>
					<td class="TD_STYLE2" th:text="${f.u_name}">

					</td>
					<td class="TD_STYLE2" th:text="${f.u_true_name}">

					</td>
					<td class="TD_STYLE2" th:text="${f.u_password}" >

					</td>
					<td class="TD_STYLE2"  th:text="${f.major_name}">

					</td>
					<td class="TD_STYLE2">
						<a th:href="|user_list_update?id=${f.u_id}|"><img src="../../images/bt_edit.gif" title="编辑" style="cursor:pointer;" onclick="location.href='user_edit.html'"/></a>
						<a th:href="|javascript:del(${f.u_id})|"><img src="../../images/bt_del.gif" title="删除" style="cursor:pointer;" onclick="doDelete(9)"/></a>
					</td>
				</tr>
			</div>
		</table>
		<!--显示分页信息-->
		<div class="row">
			<!--文字信息-->
			<div class="col-md-6">
				当前第 <input name="startPage" th:value="${pageInfo.pageNum }"  style="width: 20px"/>/[[${pageInfo.pages}]]页.一共 [[${pageInfo.total}]] 条记录
			</div>
			<!--点击分页-->
			<div class="col-md-6">
				<nav aria-label="Page navigation">
					<ul class="pagination">
						<li><a href="javascript:f1.startPage.value=1;f1.submit()">首页</a></li>
						<!--上一页-->
						<li>
							<a th:if="${pageInfo.hasPreviousPage}" href="javascript:f1.startPage.value=f1.startPage.value-1;f1.submit()" aria-label="Previous">
								<span aria-hidden="true">«</span>
							</a>
						</li>
						<!--循环遍历连续显示的页面，若是当前页就高亮显示，并且没有链接-->
						<li th:each="page_num:${pageInfo.navigatepageNums}"   th:class="${page_num == pageInfo.pageNum?'active':''}" >
							<a href="#" th:text="${page_num}" th:if="${page_num == pageInfo.pageNum}"> </a>
							<a th:if="${page_num != pageInfo.pageNum}" th:href="|javascript:f1.startPage.value=${page_num};f1.submit()|" th:text="${page_num}"></a>
						</li>
						<!--下一页-->
						<li>
							<a th:if="${pageInfo.hasNextPage}" href="javascript:f1.startPage.value=f1.startPage.value-0+1;f1.submit()"
							   aria-label="Next">
								<span aria-hidden="true">»</span>
							</a>
						</li>
						<li><a th:href="|javascript:f1.startPage.value=${pageInfo.pages};f1.submit()|">尾页</a></li>
					</ul>
				</nav>
			</div>
		</div>
	</form>
	</body>
</html>
